var gulp =require("gulp");
var livereload=require("gulp-livereload");
var webserver=require("gulp-webserver");
var sass=require("gulp-ruby-sass");
gulp.task("shuaxin",function () {
      return gulp.src("dest")
          .pipe(webserver({
              livereload:true,
              open:true
          }))
});
gulp.task("move",function () {
     return gulp.src("src/**/*.{html,css,jpg,js,png,gif}")
         .pipe(gulp.dest("dest"))
});
gulp.task("sass",function () {
      return sass("src/css/*.scss",{style:"expanded"})
          .on("error",function (err) {
                console.log(err)
          })
          .pipe(gulp.dest("dest/css"))
});
gulp.task("watch",function () {
      gulp.watch("src/**/.*{html,css,jpg,js,}",["move"])
      gulp.watch("src/css/*.scss",["sass"])
});
gulp.task("default",["move","sass","watch","shuaxin"])